#from oscar.apps.shipping.repository import Repository as CoreRepository

#from . import methods

#METHODS = (
    ##methods.OCA(),
    #methods.Standard(),
#)

#class Repository(CoreRepository):

    #def get_shipping_methods(self, user, basket, shipping_addr=None, **kwargs):
        #return self.prime_methods(basket, METHODS)

    #def find_by_code(self, code, basket):
        #method = None
        #for method_ in METHODS:
            #if method_.code == code:
                #method = method_
        #if method is None:
            #raise ValueError(
                #"No shipping method found with code '%s'" % code)
        #return self.prime_method(basket, method)

    ##def find_by_code(self, code, basket):
        ##"""
        ##Return the appropriate Method object for the given code
        ##"""
        ##known_methods = [Free, NoShippingRequired]
        ##for klass in known_methods:
            ##if code == getattr(klass, 'code'):
                ##return self.prime_method(basket, klass())
        ##return None
